<!doctype html>
<html lang="en-us">
<head>

    <meta charset="utf-8">
    <meta name="generator" content="Hugo 0.59.1" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>ssm | linxianqin.com</title>
    <meta property="og:title" content="ssm - linxianqin.com">
    <meta property="og:type" content="article">
        
        
    <meta name="Keywords" content="java,android,博客,项目管理,python,软件架构,公众号,小程序">
    <meta name="description" content="ssm">
        
    <meta name="author" content="林贤钦">
    <meta property="og:url" content="http://linxianqin.gitee.io/categories/ssm/">
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">

    <link rel="stylesheet" href="/css/normalize.css">
    
    <link rel="stylesheet" href="/css/style.css">
    <link rel="alternate" type="application/rss+xml+xml" href="http://linxianqin.gitee.io/categories/ssm/index.xml" title="linxianqin.com" />
    <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>

    


    
    
</head>


<body>
<header id="header" class="clearfix">
    <div class="container">
        <div class="col-group">
            <div class="site-name ">
                
                    <a id="logo" href="http://linxianqin.gitee.io">
                        linxianqin.com
                    </a>
                
                <p class="description">专注于Android、Java、微信小程序、移动互联网、项目管理、软件架构</p>
            </div>
            <div>
                <nav id="nav-menu" class="clearfix">
                    <a class="" href="http://linxianqin.gitee.io">首页</a>
                    
                    <a  href="http://linxianqin.gitee.io/tools/" title="工具">工具</a>
                    
                    <a  href="http://linxianqin.gitee.io/archives/" title="归档">归档</a>
                    
                    <a  href="http://linxianqin.gitee.io/about/" title="关于">关于</a>
                    
                </nav>
            </div>
        </div>
    </div>
</header>


<div id="body">
    <div class="container">
        <div class="col-group">

            <div class="col-8" id="main">
                <div class="res-cons">
                    
                    <h3 class="archive-title">
                        分类
                        <span class="keyword">ssm</span>
                        中的文章
                    </h3>
                    

                    
                        <article class="post">
                            <header>
                                <h1 class="post-title">
                                    <a href="http://linxianqin.gitee.io/post/ssm&#43;vue%E8%B7%A8%E5%9F%9F%E8%A7%A3%E5%86%B3%E5%AE%9E%E4%BE%8B/">ssm&#43;vue跨域解决实例</a>
                                </h1>
                            </header>
                            <date class="post-meta meta-date">
                                2019年11月27日
                            </date>
                            
                            <div class="post-meta meta-category">
                                |
                                
                                    <a href="http://linxianqin.gitee.io/categories/ssm">ssm</a>
                                
                                    <a href="http://linxianqin.gitee.io/categories/vue">vue</a>
                                
                            </div>
                            
                            <div class="post-content">
                                ssm配置允许任何的跨域请求 1.在springmvc.xml 中
&lt;mvc:cors&gt; &lt;mvc:mapping path=&quot;/**&quot; allowed-origins=&quot;*&quot; allowed-methods=&quot;POST, GET, OPTIONS, DELETE, PUT&quot; allowed-headers=&quot;Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With&quot; allow-credentials=&quot;true&quot; /&gt; &lt;/mvc:cors&gt;  2.在com.medicalSaleManagementSystem.fillter中创建SimpleCORSFilter类
package com.medicalSaleManagementSystem.filter; import java.io.IOException; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class SimpleCORSFilter implements Filter{ private boolean isCross = false; @Override public void destroy() { isCross = false; } @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { if (isCross) { HttpServletRequest httpServletRequest = (HttpServletRequest) request; HttpServletResponse httpServletResponse = (HttpServletResponse) response; System.……
                                <p class="readmore"><a href="http://linxianqin.gitee.io/post/ssm&#43;vue%E8%B7%A8%E5%9F%9F%E8%A7%A3%E5%86%B3%E5%AE%9E%E4%BE%8B/">阅读全文</a></p>
                            </div>
                        </article>
                    

                    





                </div>
            </div>

            <div id="secondary">
    <section class="widget">
        <form id="search" action="//www.google.com/search" method="get" accept-charset="utf-8" target="_blank" _lpchecked="1">
      
      <input type="text" name="q" maxlength="20" placeholder="Search">
      <input type="hidden" name="sitesearch" value="http://linxianqin.gitee.io">
      <button type="submit" class="submit icon-search"></button>
</form>
    </section>
    
    <section class="widget">
        <h3 class="widget-title">最近文章</h3>
<ul class="widget-list">
    
    <li>
        <a href="http://linxianqin.gitee.io/post/ssm&#43;vue%E8%B7%A8%E5%9F%9F%E8%A7%A3%E5%86%B3%E5%AE%9E%E4%BE%8B/" title="ssm&#43;vue跨域解决实例">ssm&#43;vue跨域解决实例</a>
    </li>
    
    <li>
        <a href="http://linxianqin.gitee.io/post/intBeanUtilEx%E5%B7%A5%E5%85%B7%E7%B1%BB/" title="IntBeanUtilEx工具类">IntBeanUtilEx工具类</a>
    </li>
    
</ul>
    </section>

    

    <section class="widget">
        <h3 class="widget-title">分类</h3>
<ul class="widget-list">
    
    <li><a href="http://linxianqin.gitee.io/categories/ssm/">ssm (1)</a></li>
    
    <li><a href="http://linxianqin.gitee.io/categories/vue/">vue (1)</a></li>
    
</ul>
    </section>

    <section class="widget">
        <h3 class="widget-title">标签</h3>
<div class="tagcloud">
    
    <a href="http://linxianqin.gitee.io/tags/java/">java</a>
    
</div>
    </section>

    

    <section class="widget">
        <h3 class="widget-title">其它</h3>
        <ul class="widget-list">
            <li><a href="http://linxianqin.gitee.io/index.xml">文章 RSS</a></li>
        </ul>
    </section>
</div>
        </div>
    </div>
</div>
<footer id="footer">
    <div class="container">
        &copy; 2019 <a href="http://linxianqin.gitee.io">linxianqin.com By 林贤钦</a>.
        Powered by <a rel="nofollow noreferer noopener" href="https://gohugo.io" target="_blank">Hugo</a>.
        <a href="https://www.flysnow.org/" target="_blank">Theme</a> based on <a href="https://github.com/rujews/maupassant-hugo" target="_blank">maupassant</a>.
        
    </div>
</footer>



<a id="rocket" href="#top"></a>
<script type="text/javascript" src="/js/totop.js?v=0.0.0" async=""></script>

<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
	window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
	ga('create', 'GA ID', 'auto');
	
	ga('send', 'pageview');
}
</script>
<script async src='https://www.google-analytics.com/analytics.js'></script>



    <script type="text/javascript" src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js" async></script>





</body>
</html>
